﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace QuickTweet.Common
{
    public class ViewModelBase : ObservableObject
    {
        private bool? dialogResult;
        public bool? DialogResult
        {
            get
            {
                return dialogResult;
            }
            set
            {
                if (UpdateProperty(value, ref dialogResult))
                    OnPropertyChanged("DialogResult");
            }
        }

        protected Binding CreateBinding(string propertyName)
        {
            Binding binding = new Binding(propertyName);
            binding.Source = this;
            return binding;
        }
    }
}
